package com.kyhd.audio.service;

import java.util.concurrent.CountDownLatch;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Service;

import com.kyhd.audio.util.AppConfig;

import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class AudioRunner implements ApplicationRunner {

	@Autowired
	AppConfig appConfig;
	
	@Autowired
	CountDownLatch latch;
	
	@Autowired
	AudioExchangeService audioExchangeService;
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		log.info("-----audio exchange start-----");
		String ids = appConfig.getIds();
		this.audioExchangeService.sendMsg(ids);
	}

}
